<?
/**
 * VoiceOne Webservices Methods
 * 
 * @package voiceone_webservices
 * @subpackage CDR
 */
//******************************************************************************
//******************           PUBLIC FUNCTIONS            *********************
//******************************************************************************
// ---- getAstCDR():clientsDBEntryArray ----------------------------------------
function getAstCDR($uniqueid){
  global $db;
  if(trim($uniqueid)!="") $where="WHERE `uniqueid` > '".$uniqueid."' ";
	//get cdr lines
  $ret=array();
  $qry="SELECT `uniqueid`,`calldate`,`src`,`dst`,`channel`,`dstchannel`,`duration`,`billsec`,`disposition` ";
  $qry.="FROM `cdr` ";
  $qry.=$where;
  $qry.="ORDER BY `calldate` DESC ";
  $res=$db->Execute($qry);
  if($res===false) return;
  while($arr=$res->FetchRow()){
  	$ret[]=$arr;
 	}
  return $ret;
}
//******************************************************************************
//*****************           PRIVATE FUNCTIONS            *********************
//******************************************************************************
?>